package ibm.abacus.classpath;

public class ClassLoaderSequenceTest {
	/**
	 * In this test, there are four ibm.abacus.classpath.Abacus with different
	 * status block. We put it four folder and check the result. <br />
	 * 1. Abacus.jar will not be loaded if just put the file at folder of
	 * sun.boot.class.path <br />
	 * 1. Abacus.jar will be added to sun.boot.class.path by -Xbootclasspath
	 * option. For example, java -Xbootclasspath/p:Abacus.jar
	 * ibm.abacus.classpath.ClassLoaderSequenceTest <br />
	 * 2. Abacus.jar will be loaded from java.ext.dirs at second highest
	 * priority <br />
	 * 3. Abacus.jar will not be loaded from java.library.path (variable path in
	 * environment) <br />
	 * 4. Abacus.jar will be loaded from java.class.path (variable classpath in
	 * environment if java launched in cmd, but not Eclipse.)
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println(System.getProperty("sun.boot.class.path"));
		System.out.println("****************************");
		System.out.println(System.getProperty("java.ext.dirs"));
		System.out.println("****************************");
		System.out.println(System.getProperty("java.class.path"));
		System.out.println("****************************");
		System.out.println(System.getProperty("java.library.path"));

		// class Abacus may be loaded from different folder.
		Abacus a = new Abacus();
		System.out.println(a);
	}
}
